import { getCities } from "../util/areaService";
import qs from "query-string";
import $ from "jquery";

const parsed = qs.parse(location.search);

$(".title").text(parsed.name);
const dlEl = $("dl");

getCities(parsed.id).then((cities) => {
  for (const c of cities) {
    $("<dd>").text(c.simpleName).appendTo(dlEl);
  }
});
